<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/test.js"></script>
</head>
<body>
    <script>
    //先将所有声明的变量，集中到作用域的顶部创建，赋值留在原地 
    console.log(a);
    var a = 10;
    // var a ;
    // console.log(a);
    // a = 10;
    </script>
</body>
</html>